<template>
  <vue-echart :options="option"></vue-echart>
</template>

<script>
import { VueEchart, echarts } from 'vue-echarts5'
export default {
  name: 'Echart',
  components: {
    VueEchart
  },
  computed: {
    option() {
      return {
        tooltip: {
          trigger: 'item'
        },
        legend: {
          orient: 'vertical',
          left: 'left',
          show: false
        },
        series: [
          {
            name: '访问来源',
            type: 'pie',
            radius: '90%',
            labelLine: { show: false },
            label: { show: false },
            data: [
              { value: 1048, name: '搜索引擎' },
              { value: 735, name: '直接访问' },
              { value: 580, name: '邮件营销' },
              { value: 484, name: '联盟广告' },
              { value: 300, name: '视频广告' }
            ],
            emphasis: {
              itemStyle: {
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowColor: 'rgba(0, 0, 0, 0.5)'
              }
            }
          }
        ]
      }
    }
  }
}
</script>

<style scoped></style>
